package com.example.guaiamumgigantemenu;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.widget.ImageView;
import android.widget.TextView;

public class ItemDescription extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_item_description);
		int itemId = getIntent().getIntExtra("itemId", -1);
		TextView description = (TextView) findViewById(R.id.item_description);
		TextView name = (TextView) findViewById(R.id.item_name);
		ImageView photo = (ImageView) findViewById(R.id.item_photo);
		Log.d("TAG",itemId+"");
		description.setText(getResources().getString(Translator.translationIdStringDescription(itemId)));
		name.setText(getResources().getString(Translator.translationIdStringName(itemId)));
		photo.setImageDrawable(getResources().getDrawable(Translator.translationIdStringPhoto(itemId)));
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_item_description, menu);
		return true;
	}

}
